package org.apache.lorry.zookeeper.cluster.demo;

import lombok.extern.slf4j.Slf4j;
import org.apache.lorry.zookeeper.cluster.Master;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;

@Slf4j
public class MasterDemo1 {
    public static void main(String[] args){
        Master master = new Master("localhost:2181");
        try {
            master.startZK();
            master.init();
            master.runForMaster();
            TimeUnit.MINUTES.sleep(10);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
